<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<c:set var="srcPath" value="${redis:getSysConfig('sysFileVisitRoot_back')}"/>
<c:set var="uploadPath" value="${redis:getSysConfig('uploadFileVisitRoot')}"/>
<script type="text/javascript">
    /**
     * 查看视频素材信息
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/wx/material/video/getWxMaterialVideoInfoObject.sjson",
            data: {materialVideoInfoId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                var wxMaterialVideoInfo = data.wxMaterialVideoInfo;
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                $("#d_videoName").html(wxMaterialVideoInfo.videoName);
                $("#d_videoUrl").html(wxMaterialVideoInfo.videoUrl);
                $("#d_videoSize").html(wxMaterialVideoInfo.videoSize);
                if(wxMaterialVideoInfo.createTime!=""&&wxMaterialVideoInfo.createTime!=undefined){
                    $("#d_createTime").html(new Date(wxMaterialVideoInfo.createTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
                if(wxMaterialVideoInfo.lastUpdateDate!=""&&wxMaterialVideoInfo.lastUpdateDate!=undefined){
                    $("#d_lastUpdateDate").html(new Date(wxMaterialVideoInfo.lastUpdateDate).Format("yyyy-MM-dd hh:mm:ss"));
                }
                $("#d_videoDescription").html(wxMaterialVideoInfo.videoDescription);
                $("#d_remark").html(wxMaterialVideoInfo.remark);
                $("#d_creater").html(data.createrName);
                $("#d_modifier").html(data.modifierName);
                var hv="<video src='${uploadPath}/"+wxMaterialVideoInfo.videoUrl+"'  width='350' height='200' controls autobuffer></video>";
                $("#hv").html(hv);
            }
        });
    }
</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">视频素材信息详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td">视频名称:</td><td class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_videoName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">视频:</td><td class="toleft_td" colspan="3"><span id="hv"></span></td>
					</tr>
					<tr>
						<td class="toright_td">视频地址:</td><td class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_videoUrl"></span></td>
						<td class="toright_td">视频大小:</td><td  class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_videoSize"></span></td>
					</tr>
					<tr>
						<td class="toright_td">视频描述:</td><td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_videoDescription"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">创建人:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_creater"></span></td>
						<td class="toright_td" width="150px">创建时间:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_createTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">最后修改人:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_modifier"></span></td>
						<td class="toright_td" width="150px">最后修改日期:</td><td  class="toleft_td">&nbsp;&nbsp;<span id="d_lastUpdateDate"></span></td>
					</tr>
					<tr>
						<td class="toright_td">备注:</td>
						<td  class="toleft_td" class="text" colspan="3">&nbsp;&nbsp;<span id="d_remark"></span></td>
					</tr>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
